//StatTable.h
#ifndef StatTable_H
#define StatTable_H
#include <math.h>
#include "variables.h"
#include "vector.h"

class StatTable
{
	private:

		int tableSize;
		long containersCounter;
		long exContCounter;
		
		int createTable();
		void deleteTable();
		
		int tableReseted;
		int	_HowManyBitsToWrite;

		Vector **list;
	public:
		StatTable();
		StatTable(int size);
		~StatTable();
		
		int howManyBitsToWrite(){return (int)log2(containersCounter+1)+1;}
		void clear();
		int initTable(int size);
		Vector* getList(int index) {return list[index];}
		long getExCount() {return exContCounter;}
		long getCount() {return containersCounter;}
		void add(unchar* _values, int _size);

		long getLimit() {return tableSize;}
		void saveTable();
};

#endif
